﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            OpenFileDialog opd = new OpenFileDialog();
            if (opd.ShowDialog() == DialogResult.OK)
            {
                layoutControl1.RestoreLayoutFromXml(opd.FileName);
                listBoxControl1.Items.Add(opd.FileName);  
            }

        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            layoutControl1.RestoreLayoutFromXml(listBoxControl1.SelectedItem.ToString());
        }

        private void listBoxControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            layoutControl1.RestoreLayoutFromXml(listBoxControl1.SelectedItem.ToString());

        }
    }
}
